UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0vLTrwcqTN3xbqKe/KJKr4TLG2YWmoUejCAStNzynZc='
WHERE
key_id = '0c63272ff04edcc614d07515b2c9c09900a05fd7a1c4db3abaaa3f45b982674b'
AND (
token = '0vLTrwcqTN3xbqKe/KJKr4TLG2YWmoUejCAStNzynZc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)