UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vLJq1D5ASzrYQlJPkY+XIG4Uwb8Hoqf1uY14qUlpqnU='
WHERE
key_id = 'adb5c2e6106a03c788e4da0e949a7a9a012027addcc965d33793373f525aa94d'
AND (
token = 'vLJq1D5ASzrYQlJPkY+XIG4Uwb8Hoqf1uY14qUlpqnU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)