UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rkBoXFm29IZToC3PwalXbolJvthmr+Ar+oPKoLbbZGw='
WHERE
key_id = 'bdcf670ac41c354da076aaffafcf1a3c2228a7df4acd7a9e4806184229bf1a15'
AND (
token = 'rkBoXFm29IZToC3PwalXbolJvthmr+Ar+oPKoLbbZGw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)