UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7cDVxmm7Z7fXcQ4Fh6jle14CyXwTDzjDo8KGXGyN+ko='
WHERE
key_id = '403953788751a57503d8aa1ff6e64370f54d917fb1ef23dc4da2e34d5b908e60'
AND (
token = '7cDVxmm7Z7fXcQ4Fh6jle14CyXwTDzjDo8KGXGyN+ko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)