UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ef7FIpFvZsoQEfzlDNHqcOL4c6CR7MBFbjCU6DqyQ2M='
WHERE
key_id = '455278a3101479d5978b0cc84a0db8648b0217dfc6f83c166003e8d1cc24f2af'
AND (
token = 'Ef7FIpFvZsoQEfzlDNHqcOL4c6CR7MBFbjCU6DqyQ2M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)