UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J+M/oHifSzDkeiYgbyFCqQeAn16FQmQHo0ZwNh38LAo='
WHERE
key_id = '7a3035914b48fe8db99edaf2945dcf9dce44b47a83b626076e7e1148d5b7bc81'
AND (
token = 'J+M/oHifSzDkeiYgbyFCqQeAn16FQmQHo0ZwNh38LAo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)