UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PONIp6WXIfzlukJpnaWj69hHRiIvDiNClAMeNunpl58='
WHERE
key_id = '8402a14af12355b7010274d10e701a0548cfa8a9b88685097f1ae91f6d1e56d2'
AND (
token = 'PONIp6WXIfzlukJpnaWj69hHRiIvDiNClAMeNunpl58='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)