UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sYuEwiZ7MVMW7G2ULCDQI/p2KpjDG3WtfJL+TSJXrl4='
WHERE
key_id = 'e0d77b96e1e1bca19f2447a798d9d7900e6a28f18d95081a0e022879dd20e68c'
AND (
token = 'sYuEwiZ7MVMW7G2ULCDQI/p2KpjDG3WtfJL+TSJXrl4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)