UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oVUU/zFuBXcnwF/JHM+5sfzMJBPsRgeoZmOaeASWgg4='
WHERE
key_id = '04e03fae2547b413a8135dc9cd3e1375bcc86f6a8d3e091edb5ea6f759259ea6'
AND (
token = 'oVUU/zFuBXcnwF/JHM+5sfzMJBPsRgeoZmOaeASWgg4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)