UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bqdI2oNuUidHgNbKRFmPPBNFV+ku5OiftqK7Oog8qZo='
WHERE
key_id = '018618cf0a000b8ad1400b0e750114b9503e06921077c9068a18d10ccc7b58ae'
AND (
token = 'bqdI2oNuUidHgNbKRFmPPBNFV+ku5OiftqK7Oog8qZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)