UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yvtk5/D7BICDMB07kSea9XYUP+sXwPtBFEETUtulz0M='
WHERE
key_id = '718e02c2c66d225f6d431dafaa102fc3d5668cc63e2d0fe426f49c8611978b6f'
AND (
token = 'yvtk5/D7BICDMB07kSea9XYUP+sXwPtBFEETUtulz0M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)