UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EeqMGQAMLT8LZmzwuRvbQuDlBeL2fvIw5nHbCHZ4RGY='
WHERE
key_id = '22264640dd60ac9b8f0f27ad74ba247223c4753a71147e89ad8a9022c6abdc8c'
AND (
token = 'EeqMGQAMLT8LZmzwuRvbQuDlBeL2fvIw5nHbCHZ4RGY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)