UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b2V9LYyPKhxZfVxupPfwxSIVPKEsNcKBvHCwuvlpm/Q='
WHERE
key_id = '3a94ccfae6bf9b8f1a8dbb225c43834d10bddeeda60131768aeba93c5bc581d7'
AND (
token = 'b2V9LYyPKhxZfVxupPfwxSIVPKEsNcKBvHCwuvlpm/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)