UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TBl8Mm+wunT4+6xLEiFxhYkDJPFYPfh0YdxaI4e8qjY='
WHERE
key_id = '26c6b6419f0560f7319f3b234aa14cb879fa5456d6216804d7c6d4053c149518'
AND (
token = 'TBl8Mm+wunT4+6xLEiFxhYkDJPFYPfh0YdxaI4e8qjY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)