UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NkMDYfbKxhli4r9ajZyi34XM4QboCBI/ICRKGOQtyn8='
WHERE
key_id = '70fb1392950e04f53a4e6e137f525d4de60b0b4f70711704d9a0aa32972d61a2'
AND (
token = 'NkMDYfbKxhli4r9ajZyi34XM4QboCBI/ICRKGOQtyn8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)