UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JolXRjQ8zlPlL2B32u7Dz+LmtsnWL56x0UtSOmFxSHU='
WHERE
key_id = '3fcb9226bf3cb0e58535a7fe6eeded2cc9b0ca02f2bc98976ea79dd13a9d2448'
AND (
token = 'JolXRjQ8zlPlL2B32u7Dz+LmtsnWL56x0UtSOmFxSHU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)