UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LPI6dx/aZBkmwFuFPA9t5wk0b7owfPsPtkrdJ6J7JVM='
WHERE
key_id = 'b462aba9d45f57e470ea3f8072b634cb26bd0fc592dc8650f0606a6454566181'
AND (
token = 'LPI6dx/aZBkmwFuFPA9t5wk0b7owfPsPtkrdJ6J7JVM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)