UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gp5GtB1o/turhMMUa/Oq5jsgwfkEQwhxHPdYR/uFjOU='
WHERE
key_id = 'b1ed07e03ca4c5f864a8ccafab97b10d64d34f27486172738b8c90062927525b'
AND (
token = 'Gp5GtB1o/turhMMUa/Oq5jsgwfkEQwhxHPdYR/uFjOU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)