UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wjFBgIe3X0rKZOxLsdAvqCNJki4xo/UR8vD3XLQJoaE='
WHERE
key_id = '025c9e97ed364dc9acae80bcc88b823ccf27cdbf2f0563218553e8d4eee702db'
AND (
token = 'wjFBgIe3X0rKZOxLsdAvqCNJki4xo/UR8vD3XLQJoaE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)