UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E+Ws5m65XXRZSUUDr5I3QcbOR/J/jygJoZsrwS8K5nA='
WHERE
key_id = '427daf3c1d119f59791433dd19abf65c6f4cc7c3995effa231be1d18d34339d5'
AND (
token = 'E+Ws5m65XXRZSUUDr5I3QcbOR/J/jygJoZsrwS8K5nA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)