UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LpFWUUFuElmVqoVXMe74oP4USaRd51j3oCBjmYjbj9g='
WHERE
key_id = '97183396804c0f4046c79ef765d06790f7638e3a240dfcf967604a5a92fa26d6'
AND (
token = 'LpFWUUFuElmVqoVXMe74oP4USaRd51j3oCBjmYjbj9g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)