UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vFRK4rOURbXcYkx48aYnTqH7xKYSVfc+JqB5Dqv6qiQ='
WHERE
key_id = '1044dbd76d8868205de50d43b921b6d8b8e28b1f7bb24954c9bf7b5158c688f0'
AND (
token = 'vFRK4rOURbXcYkx48aYnTqH7xKYSVfc+JqB5Dqv6qiQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)