UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dAwt+MRuS3yRWGRZ4kwav8DXBqJanXbfA04bwluNJQM='
WHERE
key_id = '0bb79f1b10b1f7edc71887c9fd4b842d9ed772abdd4165090eb0ce7ab710c4f7'
AND (
token = 'dAwt+MRuS3yRWGRZ4kwav8DXBqJanXbfA04bwluNJQM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)