UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4F1L74vwenxsxMSkrlt5PL8S8BIw5Qt7Zn7pZ7DjrTQ=' 
WHERE 
  key_id = 'b15734ffcfc4f3be5446019d7dc53049e66936ceee7fe9503a3afb597a7e5f44' 
  AND (
    token = '4F1L74vwenxsxMSkrlt5PL8S8BIw5Qt7Zn7pZ7DjrTQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025