UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VWcAdT7Fo7R01ilPEK7KMJ5gBLnBBBzqcMpWw+nBtKY='
WHERE
key_id = '0616f68ad6063ea33dbbc3cf7d7644b38c77b0795ab8d013b1b466fb3b783f14'
AND (
token = 'VWcAdT7Fo7R01ilPEK7KMJ5gBLnBBBzqcMpWw+nBtKY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)