UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yXL3Dew47O0fXUlhuERP4t3KdOhNRuUxBKlDxSJyDuQ='
WHERE
key_id = '43416e5be7b293a2fbe7f219661f95cee50af7c741eef3252380298ee5c3c59e'
AND (
token = 'yXL3Dew47O0fXUlhuERP4t3KdOhNRuUxBKlDxSJyDuQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)