UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iWMU/kVehaVRVup3y57mBkoZJ42XA+VBZ0jB6sxiUus='
WHERE
key_id = '757dd8ef8c2ec2fbb2eb1a910546b7550b7a893eb61b05797a8a87b206a6fa66'
AND (
token = 'iWMU/kVehaVRVup3y57mBkoZJ42XA+VBZ0jB6sxiUus='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)