UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5LzSztys/Gq4Y8CaVZ8xd6Q/511YsDNP+eNbS7dxOQU='
WHERE
key_id = 'e37c728e0d6595e84cfd23a2a96a30c5981ed14478761c05ffa958486eeeaa70'
AND (
token = '5LzSztys/Gq4Y8CaVZ8xd6Q/511YsDNP+eNbS7dxOQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)